class Animal:
    def eat(self):
        print("动物吃东西")
class Dog(Animal):
    def eat(self):
        print("狗吃骨头")
class Cat(Animal):
    def eat(self):
        print("猫吃老鼠")

def animal_eat(animal):
    animal.eat()

dog = Dog()
cat = Cat()
animal_eat(dog)
animal_eat(cat)